<?php

/*
*###########################################################################################################################*
#															    															#
#															    															#
#    **  ** ****** ** **  **  ****** ** ***   ** ***   ****** ** **  **  ** **  ** ** **  **    ****   ** **  **  ******    #
#    **  ** ****** ********** ****** *******  *******  ****** ********** ** **  ** **********  ******  ********** ******    #
#    **  ** **  ** **  **  ** **     ***   ** **    ** **     **  **  **    **  ** **  **  ** ***   ** **  **  ** **        #
#    ****** **  ** **  **  ** ****** **   *** **   *** ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    ****** **  ** **  **  ** ****** *******  *******  ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    **  ** **  ** **  **  ** **     *****    ******   **     **  **  ** ** **  ** **  **  ** ***   ** **  **  **     **    #
#    **  ** ****** **  **  ** ****** **       **  ***  ****** **  **  ** ** ****** **  **  **  ******  **  **  ** ******    #
#    **  ** ****** **  **  ** ****** **       **   *** ****** **  **  ** **  ** ** **  **  **   ****   **  **  ** ******    #
#															    															#
#															    															#
#															    															#
#    2010 - 2011 © HomePremiumCMS made by HomePemium as PremiumEye & Security by HomePremium and Merijnz		    		#
#															    															#
#    Powered by PhoenixPHP 3.7.1 (build 138000)										    									#
#															    															#
#															    															#
#															    															#
*###########################################################################################################################*
*/

define('USERNAME_REQUIRED', TRUE);
define('ACCOUNT_REQUIRED', TRUE);
include('../global.php');
define("THIS_SCRIPT", 'display');
$username = $core->EscapeString($_SESSION['username']);
$email = $core->EscapeString($_SESSION['account']);
if($users->UserPermission('forum_login', $core->EscapeString($username))){}else{header("Location: display.php");}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $sitename." - Forum"; ?></title>

<link type="text/css" rel="stylesheet" href="../Public/Styles/<?php echo $currentstyle ?>/CSS/main.css" />
</head>

<body>

<?php include("header.php"); ?>

<div class="mainBox">

	<?php include("navigation.php"); ?>

	<div class="mid" id="midcontent">
    
    	<div style="width: 930px; margin-left: 1px; float: left; margin-top:10px;">
        
        	<div id="forum_top"></div>
        
        	<div id="forum_middle">
            	
                <div style="margin-top: -14px;"></div>
                
                <div id="forum_rounded_container_light_grey"><a href="control.php">Home</a> || <a href="control.php?page=display">Forum Display</a></div>
                
                <?php 
				$query = mysql_query("SELECT * FROM forum WHERE id = ".$core->EscapeString($_GET['id']).""); 
				$forum = mysql_fetch_array($query);
				
				$querye = mysql_query("SELECT * FROM forum WHERE id = ".$core->EscapeString($_GET['id']).""); 
				$edit = mysql_fetch_array($querye);
				?>

            	<form method="post" action="actions/control_modify_forum.php">
                
                	<div id="forum_items">
                    
                    	<input type="hidden" name="id" value="<?php echo $edit['id']; ?>"/>
                        
                        <label><?php echo $lang['by_title']; ?></label><br />
                        <select name="forum_title">
                        	<?php 
								$queryt = mysql_query("SELECT * FROM forum_titles"); 
								while($title = mysql_fetch_array($queryt)){
									?>
                            			<option <?php if($edit['forum_title'] == $title['id']){ echo' selected="selected" '; } ?> value="<?php echo $title['id']; ?>"><?php echo $title['name']; ?></option>
									<?php
								}
							?>
                        </select><br />
                        
                        <label><?php echo $lang['title']; ?></label><br />
                        <input type="text" name="name" value="<?php echo $edit['name']; ?>" style="width:97%;margin-left:0;" />
                        
                        <label><?php echo $lang['description']; ?></label><br />
                        <input type="text" name="description" value="<?php echo $edit['description']; ?>" style="width:97%;margin-left:0;" />
                        
                    </div>
                
                	<div id="forum_items" style="margin-bottom: -30px;">
                
                		<input style="float: left;" type="submit" value="<?php echo $lang['post']; ?>" />
                
               		</div>
                
                </form>
                
            </div>
            
            <div id="forum_bottom"></div>
        
        </div>
        
    </div>
    
    <?php include("../system/footer.php"); ?>
    
</div>
</body>
</html>